package com.example.demo2.util;

import org.mindrot.jbcrypt.BCrypt;

public class BCryptUtil {

    public static String encrypt(String password){
        return BCrypt.hashpw(password, BCrypt.gensalt(10));
    }

    public static boolean verify(String plaintext,String hashed){
        return BCrypt.checkpw(plaintext, hashed);
    }
}
